import { CreateReadStreamParams } from "./type";
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("preload", {
    node: () => process.versions.node,
    chrome: () => process.versions.chrome,
    electron: () => process.versions.electron,
    createReadStream: (args: CreateReadStreamParams) =>
        ipcRenderer.invoke("createReadStream", args),
    stat: (args: string) => ipcRenderer.invoke("stat", args),
    onCloseWindow: (callback: (...args: any[]) => void) =>
        ipcRenderer.on("close-window", (_event, value) => callback(value)),
});
